package com.dnjn.happiness.emo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.time.LocalDateTime;

/**
 * 任务派发userRecordTask对象 emo_user_record_task
 * 
 * @author amber
 * @date 2024-01-12
 */
@Schema(name = "UserRecordTask", description = "任务派发userRecordTask")
@Accessors(chain = true)
@Getter
@Setter
@TableName("emo_user_record_task")
public class UserRecordTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 已读时间 */
    private LocalDateTime dateRead;

    /** 发起人 */


    /** 经度 */
    private String longitude;

    /** 任务状态 A_APPLIED B_RECEIVED C_CHECKED_IN D_FEEDBACK_GIVEN F_DONE */
    private String taskStatus;

    /** 任务层级<=2 1-主任务 2-支线任务 */
    private Integer level;

    /** PK */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "task_id", type = IdType.ASSIGN_ID)
    private Long taskId;

    /** 是否删除|0-否 1-是 */
    private String deleted;

    /** 附件JSON */
    private String attachmentJson;

    /** 结束时间 */
    private LocalDateTime dateDeadline;

    /** 评分 */
    private Integer taskScore;

    /** 任务内容 */
    private String taskContent;

    /** 交办对象id */
    private Long userId;

    /** 纬度 */
    private String latitude;

    /** 是否已读交办对象点开任务详情页面时更新 Y-N */
    private String hasRead;

    /** 发起人id */
    private Long initiatorId;

    /** 任务类型 内勤-INNER 外勤-OUTER */
    private String taskType;

    /**  */
    private Long parentTaskId;

    /** 评价 */
    private String result;

    /**  */
    private String taskTitle;

    /**  */
    private String addressline;

    




//    @TableField(exist = false)
//    @Schema(description = "任务详情")
//    private List<UserRecordTaskTimeline> userRecordTaskTimelines;






    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("dateRead", getDateRead())

            .append("longitude", getLongitude())
            .append("taskStatus", getTaskStatus())
            .append("level", getLevel())
            .append("taskId", getTaskId())
            .append("deleted", getDeleted())
            .append("attachmentJson", getAttachmentJson())
            .append("dateDeadline", getDateDeadline())
            .append("updateBy", getUpdateBy())
            .append("taskScore", getTaskScore())
            .append("taskContent", getTaskContent())
            .append("createBy", getCreateBy())
            .append("userId", getUserId())
            .append("latitude", getLatitude())
            .append("hasRead", getHasRead())
            .append("initiatorId", getInitiatorId())
            .append("taskType", getTaskType())
            .append("parentTaskId", getParentTaskId())
            .append("version", getVersion())
            .append("remark", getRemark())
            .append("updateTime", getUpdateTime())
            .append("result", getResult())
            .append("createTime", getCreateTime())
            .append("taskTitle", getTaskTitle())
            .append("addressline", getAddressline())

            .toString();
    }
}
